function saveAsPbtxt(filename: any, str: any) {
  const blob = new Blob([str], { type: "application/json;charset=utf-8" });
  const href = URL.createObjectURL(blob);
  const alink = document.createElement("a");
  alink.style.display = "none";
  alink.download = filename; // 下载后文件名
  alink.href = href;
  document.body.appendChild(alink);
  alink.click();
  document.body.removeChild(alink); // 下载完成移除元素
  URL.revokeObjectURL(href); // 释放掉blob对象
}
//导出公共方法
export  { saveAsPbtxt };